﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace Gadgets.Common
{
    public partial class StockExchange : UserControl
    {
        public StockExchange()
        {
            InitializeComponent();
        }

        private void StockExchange_Load(object sender, EventArgs e)
        {
            cboBoardType.Items.Clear();
            cboBoardType.ValueMember = "ID";
            cboBoardType.DisplayMember = "Value";
            cboBoardType.Items.Add(new MyComboItem("-1", string.Empty));
            cboBoardType.Items.Add(new MyComboItem("1", "HOSE"));
            cboBoardType.Items.Add(new MyComboItem("2", "HASTC"));
            cboBoardType.Items.Add(new MyComboItem("3", "UPCOM"));
            cboBoardType.SelectedIndex = 0;
        }

        public int Value
        {
            get
            {
                return Convert.ToInt16(((MyComboItem)cboBoardType.SelectedItem).ID);
            }
        }
        public override string Text
        {
            get
            {
                return ((MyComboItem)cboBoardType.SelectedItem).Value;
            }
        }
    }
}
